package woniuxy.model;

import lombok.Data;

import java.util.List;

/**
 * ClassName:Country
 * Package:entity
 *
 * @date:2021/11/1 8:09 下午
 * @author: Tiangle
 */
@Data
public class Country {
    private String Code;//primary key
    private String Name;
    private String Continent;
    private String Region;
    private Float SurfaceArea;
    private Short Indepyear;
    private Integer population;

    private Float lifeexpectancy;

    private Float gnp;

    private Float gnpold;

    private String localname;

    private String governmentform;

    private String headofstate;

    private Integer capital;

    private String code2;
    List<City> cities;

    @Override
    public String toString() {
        String str = "Country:\n" +
                "Code=" + Code + '\n' +
                "Name=" + Name + '\n' +
                "Continent=" + Continent + '\n' +
                "Region=" + Region + '\n' +
                "SurfaceArea=" + SurfaceArea +'\n' +
                "Indepyear=" + Indepyear +'\n' +
                "population=" + population +'\n' +
                "lifeexpectancy=" + lifeexpectancy +'\n' +
                "gnp=" + gnp +'\n' +
                "gnpold=" + gnpold +'\n' +
                "localname=" + localname + '\n' +
                "governmentform=" + governmentform + '\n' +
                "headofstate=" + headofstate + '\n' +
                "capital=" + capital +'\n' +
                "code2=" + code2 +"\n";
//        if (cities!=null){
//            str+= "cities:\n";
//            for (City city : cities) {
//                str+=city;
//            }
//        }
        return str;
    }
}
